package com.ins.model.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * app用户表 实体类。
 *
 * @author ins
 * @since 2024-05-14
 */
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@Data(staticConstructor = "of")
@Table(value = "app_user")
public class AppUser extends BaseEntity<AppUser> implements Serializable {

    @Serial
    private static final long serialVersionUID = 3359409664874432330L;

    /**
     * 微信openid
     */
    @Column(value = "open_id")
    private String openId;

    /**
     * 账号
     */
    @Column(value = "account")
    private String account;

    /**
     * 用户姓名
     */
    @Column(value = "user_name")
    private String userName;

    /**
     * 真实姓名
     */
    @Column(value = "real_name")
    private String realName;

    /**
     * 昵称
     */
    @Column(value = "nick_name")
    private String nickName;

    /**
     * 密码
     */
    @Column(value = "password")
    @JsonIgnore
    private String password;

    /**
     * 电话
     */
    @Column(value = "phone")
    private String phone;

    /**
     * 头像
     */
    @Column(value = "avatar")
    private String avatar;

    /**
     * 认证id 人是身份证，企业是社会信用代码
     */
    @Column(value = "id_card_no")
    private String idCardNo;

    /**
     * 是否认证1：是   0：否
     */
    @Column(value = "has_aut")
    private Integer hasAut;

    /**
     * 认证类型1：个人，2：企业
     */
    @Column(value = "aut_type")
    private Integer autType;

    /**
     * 认证标识 1：蓝v，2金v
     */
    @Column(value = "aut_tag")
    private Integer autTag;

    /**
     * 个人简介
     */
    @Column(value = "intro")
    private String intro;

    /**
     * 0未知 1男 2女
     */
    @Column(value = "sex")
    private Integer sex;

    @Column(value = "age")
    private Integer age;

    /**
     * 出生日期
     */
    @Column(value = "birthday")
    private LocalDate birthday;

    /**
     * 注册时间
     */
    @Column(value = "reg_time")
    private LocalDateTime regTime;

    /**
     * 最后一次登录时间
     */
    @Column(value = "last_login_time")
    private LocalDateTime lastLoginTime;


}
